package com.boot.dubbo.consumer.controller;

import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;

import com.alibaba.dubbo.config.annotation.Reference;
import com.boot.dubbo.inter.UserService;
import com.boot.dubbo.model.UserModel;

@RestController
public class UserController {

	@Reference
	UserService userService;

	@ResponseBody // 以json格式返回
	@RequestMapping("/getUser")
	public UserModel initOrder() {
		return userService.getUser();
	}
}
